import { createStore, combineReducers } from 'redux'
// 张三的reducer
import reducer from './reducer'

// 李四的reducer
import lsReducer from './lsReducer'

// combineReducers的返回值就是合并好的reducer
const rootReducer = combineReducers({
  zs: reducer,
  ls: lsReducer,
})

const store = createStore(
  rootReducer,
  window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()
)

export default store
